<html lang="java">
<head>
    <title>123</title>
    <style type="text/css">
        body {
            background-size: 100% 100%;
            height: 100%;
            width: 100%;
            text-align: center;
            margin-top: 50px;
            margin-left: auto;
        }

        table {
            text-align: center;
            margin: auto;
            text-decoration-color: #E3E6EB;
        }

        h1 {
            font-size: 35px;
            color: #5d5a8b;
        }
    </style>
</head>
<body background="/static/img/21.jpeg">
<#--<body background="/static/img/Q2.jpg">-->
<h1>部门管理</h1>
<a href="/record/insertdepartment.html">添加</a>
<form action="" method="post">
    <table cellpadding="8" cellspacing="0" border="1">
        <tr>
            <td>编号</td>
            <td>部门名称</td>
            <td>部门简介</td>
            <td>操作</td>
        </tr>
        <#list   departments as department>
            <tr>
                <td>${department_index+1}</td>
                <td>${department.dName}</td>
                <td>${department.dDesc}</td>
                <td>
                    <a  style="color: #1c94c4" onclick="todelete()">删除</a>
                    <a href="/record/updatedepartment.html?dId=${department.dId}">修改</a>
                    <script type="text/javascript">
                        function todelete() {
                            if (confirm("确定删除?")) {
                                location.href = "/record/deletedepartment.html?dId=${department.dId}";
                            }
                        }
                    </script>
                </td>
            </tr>
        </#list>

    </table>
</form>

</body>
</html>